-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support other compression methods for squashfs #14
Add support other compression methods for squashfs #14
Conversation
Testing with unsquashfs and I'm getting an error. It seems that I need to output a compressor options structure to the archive. Will dig into it. |
Ok, so, it seems that it will require a bit more work than expected, as it requires to handle compression options (e.g for Lz4 here), though I thought that it was requiring to set a flags in the super block, but it seems that it does try to extract the options anyway (here) It will take a bit more time to check all these details 😅 |
Thanks a lot for working on this! |
Ok, I got it working. Now I'm going to have to cleanup and optimize a bit more things. I have one question: I need to add the implementation of a e.g
|
Nevermind, I can actually workaround it with a standard |
…ge for compressed streams.
Last commit should fix remaining issues. I have slightly optimized things related to usage of MemoryStream to reuse a shared one in the builder. I have also successfully tested on a Linux box:
|
New Stream derived classes and other I/O related general purpose classes should be in DiscUtils.Streams. It would not create a new dependency, all DiscUtils projects use DiscUtils.Streams already. Some do not reference it directly though because it is brought in automatically by the dependency on DiscUtils.Core which uses DiscUtils.Streams. |
Great! Thanks a lot for your contribution! I'll take a look in the next few days! |
I have had some quick looks at the code. It looks good for most parts, but just a couple of things:
I can branch the pull request and make some changes that I have in mind! |
0f41198
into
LTRData:add-support-other-compression-methods-for-squashfs
I created a new branch for working on this until I merge it into master branch. |
Thank you for taking this PR, looking forward for the final merge! |
* Update .gitignore with standard VS/Resharper and various stuffs * Add PolySharp to support init properties * Add support for other compression methods to squashfs * Fix options to only emit them if necessary. Optimize MemoryStream usage for compressed streams. * Add support other compression methods for squashfs (#14) * Update .gitignore with standard VS/Resharper and various stuffs * Add PolySharp to support init properties * Add support for other compression methods to squashfs * Fix options to only emit them if necessary. Optimize MemoryStream usage for compressed streams. * Fixed/reverted some changes * Corrected mistake in target framework versions --------- Co-authored-by: Alexandre Mutel <[email protected]>
Fixes #13
Somes notes about this PR:
Func<X,Y>
for resolving compressors/streams to simplify the code and avoid polluting the namespace with delegates. If you prefer delegates for consistency of the codebase, let me know and I can change it.